how to show the output after the form submit in JavaScript